Change in openvpn[master]: Fix various badly placed comments in preparation for reformat
A message that is not in the archive (sent off-list or not yet received): gerrit.1748255754000.I83831060fdf5588a0ada8d6abbedc7ce3ded4182@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email
to review the following change.
Change subject: Fix various badly placed comments in preparation for reformat
......................................................................
Fix various badly placed comments in preparation for reformat
---
M src/openvpn/buffer.c
M src/openvpn/multi_io.c
M src/openvpn/networking.h
M src/openvpn/options.c
M src/openvpn/otime.c
M src/openvpn/otime.h
M src/openvpn/tun.h
7 files changed, 15 insertions(+), 8 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1030/1
src/openvpn/buffer.c +2 -1
@@ -910,7 +910,8 @@ {return true; } -if ((flags &CC_PRINT ) && (c >=32 && c !=127 ))/* allow ascii non-control and UTF-8, consider DEL to be a control */ +/* allow ascii non-control and UTF-8, consider DEL to be a control */ +if ((flags &CC_PRINT ) && (c >=32 && c !=127 )) {return true; }
src/openvpn/multi_io.c +2 -1
@@ -247,7 +247,8 @@case TA_TUN_WRITE : looking_for =TUN_WRITE ; tun_input_pending =NULL ; - c->c2.timeval.tv_sec =1 ;/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ +/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ + c->c2.timeval.tv_sec =1 ;perf_push (PERF_PROC_OUT_TUN_MTCP );io_wait (c,IOW_TO_TUN );perf_pop ();
src/openvpn/networking.h +1 -1
@@ -302,7 +302,7 @@ int metric);/** -* Delete a route for an IPv4 address/network +* Delete a route for an IPv6 address/network * * @param ctx the implementation specific context * @param dst the destination of the route
src/openvpn/options.c +2 -1
@@ -8398,9 +8398,10 @@VERIFY_PERMISSION (OPT_P_DHCPDNS ); setenv_foreign_option(options, (const char **)p, 3, es); } -else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ])/* ignore when pushed to non-Windows OS */ +else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ]) {VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS ); +/* ignore when pushed to non-Windows OS */ }#endif /* ifdef _WIN32 */ #if PASSTOS_CAPABILITY
src/openvpn/otime.c +4 -2
@@ -44,8 +44,10 @@void update_now (const time_t system_time) { -const int forward_threshold =86400 ;/* threshold at which to dampen forward jumps */ -const int backward_trigger =10 ;/* backward jump must be >= this many seconds before we adjust */ +/* threshold at which to dampen forward jumps */ +const int forward_threshold =86400 ; +/* backward jump must be >= this many seconds before we adjust */ +const int backward_trigger =10 ;time_t real_time = system_time + now_adj;if (real_time > now)
src/openvpn/otime.h +2 -1
@@ -246,7 +246,8 @@static inline bool tv_within_sigma (const struct timeval *t1,const struct timeval *t2,unsigned int sigma) { -const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );/* sigma should be less than 10 minutes */ +/* sigma should be less than 10 minutes */ +const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );return -(int )sigma <= delta && delta <= (int )sigma; }
src/openvpn/tun.h +2 -1
@@ -212,7 +212,8 @@#ifdef _WIN32HANDLE hand; -OVERLAPPED dco_new_peer_ov;/* used for async NEW_PEER dco call, which might wait for TCP connect */ +/* used for async NEW_PEER dco call, which might wait for TCP connect */ +OVERLAPPED dco_new_peer_ov;struct overlapped_io reads;struct overlapped_io writes;struct rw_handle rw_handle;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I83831060fdf5588a0ada8d6abbedc7ce3ded4182
Gerrit-Change-Number: 1030
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email )
Change subject: Fix various badly placed comments in preparation for reformat
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I83831060fdf5588a0ada8d6abbedc7ce3ded4182
Gerrit-Change-Number: 1030
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 03 Jun 2025 16:30:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH 1/1 Fix various badly placed comments in preparation for reformat
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1030
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/buffer.c +2 -1
@@ -910,7 +910,8 @@ {return true; } -if ((flags &CC_PRINT ) && (c >=32 && c !=127 ))/* allow ascii non-control and UTF-8, consider DEL to be a control */ +/* allow ascii non-control and UTF-8, consider DEL to be a control */ +if ((flags &CC_PRINT ) && (c >=32 && c !=127 )) {return true; }
src/openvpn/multi_io.c +2 -1
@@ -247,7 +247,8 @@case TA_TUN_WRITE : looking_for =TUN_WRITE ; tun_input_pending =NULL ; - c->c2.timeval.tv_sec =1 ;/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ +/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ + c->c2.timeval.tv_sec =1 ;perf_push (PERF_PROC_OUT_TUN_MTCP );io_wait (c,IOW_TO_TUN );perf_pop ();
src/openvpn/networking.h +1 -1
@@ -302,7 +302,7 @@ int metric);/** -* Delete a route for an IPv4 address/network +* Delete a route for an IPv6 address/network * * @param ctx the implementation specific context * @param dst the destination of the route
src/openvpn/options.c +2 -1
@@ -8398,9 +8398,10 @@VERIFY_PERMISSION (OPT_P_DHCPDNS ); setenv_foreign_option(options, (const char **)p, 3, es); } -else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ])/* ignore when pushed to non-Windows OS */ +else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ]) {VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS ); +/* ignore when pushed to non-Windows OS */ }#endif /* ifdef _WIN32 */ #if PASSTOS_CAPABILITY
src/openvpn/otime.c +4 -2
@@ -44,8 +44,10 @@void update_now (const time_t system_time) { -const int forward_threshold =86400 ;/* threshold at which to dampen forward jumps */ -const int backward_trigger =10 ;/* backward jump must be >= this many seconds before we adjust */ +/* threshold at which to dampen forward jumps */ +const int forward_threshold =86400 ; +/* backward jump must be >= this many seconds before we adjust */ +const int backward_trigger =10 ;time_t real_time = system_time + now_adj;if (real_time > now)
src/openvpn/otime.h +2 -1
@@ -246,7 +246,8 @@static inline bool tv_within_sigma (const struct timeval *t1,const struct timeval *t2,unsigned int sigma) { -const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );/* sigma should be less than 10 minutes */ +/* sigma should be less than 10 minutes */ +const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );return -(int )sigma <= delta && delta <= (int )sigma; }
src/openvpn/tun.h +2 -1
@@ -212,7 +212,8 @@#ifdef _WIN32HANDLE hand; -OVERLAPPED dco_new_peer_ov;/* used for async NEW_PEER dco call, which might wait for TCP connect */ +/* used for async NEW_PEER dco call, which might wait for TCP connect */ +OVERLAPPED dco_new_peer_ov;struct overlapped_io reads;struct overlapped_io writes;struct rw_handle rw_handle;
[Openvpn-devel] [PATCH applied] Re: Fix various badly placed comments in preparation for reformat
Only whitespace changes, but beyond what automatic tools will do (without making them reformat everything). One comment bugfix.
Your patch has been applied to the master branch.
commit 9cc7c68bd8d42b9e1c02fd3f069d404b5c056b57
Author: Frank Lichtenheld Date: Tue Jun 3 18:30:34 2025 +0200
Fix various badly placed comments in preparation for reformat
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31872.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: Fix various badly placed comments in preparation for reformat
......................................................................
Fix various badly placed comments in preparation for reformat
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31872.html
---
M src/openvpn/buffer.c
M src/openvpn/multi_io.c
M src/openvpn/networking.h
M src/openvpn/options.c
M src/openvpn/otime.c
M src/openvpn/otime.h
M src/openvpn/tun.h
7 files changed, 15 insertions(+), 8 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1030/2
src/openvpn/buffer.c +2 -1
@@ -910,7 +910,8 @@ {return true; } -if ((flags &CC_PRINT ) && (c >=32 && c !=127 ))/* allow ascii non-control and UTF-8, consider DEL to be a control */ +/* allow ascii non-control and UTF-8, consider DEL to be a control */ +if ((flags &CC_PRINT ) && (c >=32 && c !=127 )) {return true; }
src/openvpn/multi_io.c +2 -1
@@ -247,7 +247,8 @@case TA_TUN_WRITE : looking_for =TUN_WRITE ; tun_input_pending =NULL ; - c->c2.timeval.tv_sec =1 ;/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ +/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ + c->c2.timeval.tv_sec =1 ;perf_push (PERF_PROC_OUT_TUN_MTCP );io_wait (c,IOW_TO_TUN );perf_pop ();
src/openvpn/networking.h +1 -1
@@ -302,7 +302,7 @@ int metric);/** -* Delete a route for an IPv4 address/network +* Delete a route for an IPv6 address/network * * @param ctx the implementation specific context * @param dst the destination of the route
src/openvpn/options.c +2 -1
@@ -8392,9 +8392,10 @@VERIFY_PERMISSION (OPT_P_DHCPDNS ); setenv_foreign_option(options, (const char **)p, 3, es); } -else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ])/* ignore when pushed to non-Windows OS */ +else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ]) {VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS ); +/* ignore when pushed to non-Windows OS */ }#endif /* ifdef _WIN32 */ #if PASSTOS_CAPABILITY
src/openvpn/otime.c +4 -2
@@ -44,8 +44,10 @@void update_now (const time_t system_time) { -const int forward_threshold =86400 ;/* threshold at which to dampen forward jumps */ -const int backward_trigger =10 ;/* backward jump must be >= this many seconds before we adjust */ +/* threshold at which to dampen forward jumps */ +const int forward_threshold =86400 ; +/* backward jump must be >= this many seconds before we adjust */ +const int backward_trigger =10 ;time_t real_time = system_time + now_adj;if (real_time > now)
src/openvpn/otime.h +2 -1
@@ -246,7 +246,8 @@static inline bool tv_within_sigma (const struct timeval *t1,const struct timeval *t2,unsigned int sigma) { -const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );/* sigma should be less than 10 minutes */ +/* sigma should be less than 10 minutes */ +const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );return -(int )sigma <= delta && delta <= (int )sigma; }
src/openvpn/tun.h +2 -1
@@ -212,7 +212,8 @@#ifdef _WIN32HANDLE hand; -OVERLAPPED dco_new_peer_ov;/* used for async NEW_PEER dco call, which might wait for TCP connect */ +/* used for async NEW_PEER dco call, which might wait for TCP connect */ +OVERLAPPED dco_new_peer_ov;struct overlapped_io reads;struct overlapped_io writes;struct rw_handle rw_handle;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I83831060fdf5588a0ada8d6abbedc7ce3ded4182
Gerrit-Change-Number: 1030
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email )
Change subject: Fix various badly placed comments in preparation for reformat
......................................................................
Fix various badly placed comments in preparation for reformat
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31872.html
---
M src/openvpn/buffer.c
M src/openvpn/multi_io.c
M src/openvpn/networking.h
M src/openvpn/options.c
M src/openvpn/otime.c
M src/openvpn/otime.h
M src/openvpn/tun.h
7 files changed, 15 insertions(+), 8 deletions(-)
src/openvpn/buffer.c +2 -1
@@ -910,7 +910,8 @@ {return true; } -if ((flags &CC_PRINT ) && (c >=32 && c !=127 ))/* allow ascii non-control and UTF-8, consider DEL to be a control */ +/* allow ascii non-control and UTF-8, consider DEL to be a control */ +if ((flags &CC_PRINT ) && (c >=32 && c !=127 )) {return true; }
src/openvpn/multi_io.c +2 -1
@@ -247,7 +247,8 @@case TA_TUN_WRITE : looking_for =TUN_WRITE ; tun_input_pending =NULL ; - c->c2.timeval.tv_sec =1 ;/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ +/* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */ + c->c2.timeval.tv_sec =1 ;perf_push (PERF_PROC_OUT_TUN_MTCP );io_wait (c,IOW_TO_TUN );perf_pop ();
src/openvpn/networking.h +1 -1
@@ -302,7 +302,7 @@ int metric);/** -* Delete a route for an IPv4 address/network +* Delete a route for an IPv6 address/network * * @param ctx the implementation specific context * @param dst the destination of the route
src/openvpn/options.c +2 -1
@@ -8392,9 +8392,10 @@VERIFY_PERMISSION (OPT_P_DHCPDNS ); setenv_foreign_option(options, (const char **)p, 3, es); } -else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ])/* ignore when pushed to non-Windows OS */ +else if (streq (p[0 ],"route-method" ) && p[1 ] && !p[2 ]) {VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS ); +/* ignore when pushed to non-Windows OS */ }#endif /* ifdef _WIN32 */ #if PASSTOS_CAPABILITY
src/openvpn/otime.c +4 -2
@@ -44,8 +44,10 @@void update_now (const time_t system_time) { -const int forward_threshold =86400 ;/* threshold at which to dampen forward jumps */ -const int backward_trigger =10 ;/* backward jump must be >= this many seconds before we adjust */ +/* threshold at which to dampen forward jumps */ +const int forward_threshold =86400 ; +/* backward jump must be >= this many seconds before we adjust */ +const int backward_trigger =10 ;time_t real_time = system_time + now_adj;if (real_time > now)
src/openvpn/otime.h +2 -1
@@ -246,7 +246,8 @@static inline bool tv_within_sigma (const struct timeval *t1,const struct timeval *t2,unsigned int sigma) { -const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );/* sigma should be less than 10 minutes */ +/* sigma should be less than 10 minutes */ +const int delta =tv_subtract (t1, t2,TV_WITHIN_SIGMA_MAX_SEC );return -(int )sigma <= delta && delta <= (int )sigma; }
src/openvpn/tun.h +2 -1
@@ -212,7 +212,8 @@#ifdef _WIN32HANDLE hand; -OVERLAPPED dco_new_peer_ov;/* used for async NEW_PEER dco call, which might wait for TCP connect */ +/* used for async NEW_PEER dco call, which might wait for TCP connect */ +OVERLAPPED dco_new_peer_ov;struct overlapped_io reads;struct overlapped_io writes;struct rw_handle rw_handle;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1030?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I83831060fdf5588a0ada8d6abbedc7ce3ded4182
Gerrit-Change-Number: 1030
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged